package test.san.baseproject.ui.fragment

import android.util.Log
import test.san.baseproject.adapter.HomeAdapter
import test.san.baseproject.base.BaseListAdapter
import test.san.baseproject.base.BaseListFragment
import test.san.baseproject.base.BaseListPresenter
import test.san.baseproject.model.BaseBean
import test.san.baseproject.presenter.impl.HomePresenterImp
import test.san.baseproject.widet.HomeItemView

class HomeFragment: BaseListFragment<List<BaseBean>, BaseBean, HomeItemView>() {
    override fun getList(bean: List<BaseBean>?): List<BaseBean> {
        return bean!!
    }

    override fun getSpecialAdapter(): BaseListAdapter<BaseBean, HomeItemView> {
        return HomeAdapter()
    }

    override fun getSpecialPresenter(): BaseListPresenter {
        return HomePresenterImp(this)
    }

    override fun onDestroy() {
        super.onDestroy()
        Log.e("${this.javaClass.name}", "onDestroy")
        // 解绑
        presneter.destoryView()
    }
}